/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Sekertariat;

import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;

/**
 *
 * @author Indrayanto
 */
public class Login extends JFrame {

   JLabel judul, nmProg, logo, background;
   JButton user, sekretariat;

    public Login() {
        this.setTitle("LOGIN");
        this.setBounds(0,0, 800, 650);
        this.setResizable(false);
        this.setLayout(null);
        this.setDefaultCloseOperation(EXIT_ON_CLOSE);

        logo = new JLabel(new ImageIcon("sadarbig.png"));
        logo.setBounds(220, 130, 400, 400);
        this.add(logo);



        judul = new JLabel("LOGIN");
        judul.setFont(new Font("Serif", Font.BOLD, 35));
        judul.setBounds(40, 30, 750, 50);
        judul.setHorizontalAlignment(JTextField.CENTER);
        this.add(judul);

        nmProg = new JLabel("Administrasi Surat Dan Dokumen");
        nmProg.setFont(new Font("Serif", Font.BOLD, 35));
        nmProg.setBounds(40, 70, 750, 50);
        nmProg.setHorizontalAlignment(JTextField.CENTER);
        this.add(nmProg);

        user = new JButton("User");
        user.setFont(new Font("Serif", Font.BOLD, 20));
        user.setBounds(300, 540, 100, 50);
        this.add(user);

        sekretariat = new JButton("Sekretariat");
        sekretariat.setFont(new Font("Serif", Font.BOLD, 20));
        sekretariat.setBounds(405, 540, 170, 50);
        sekretariat.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                 FrameSekretariat fut = new FrameSekretariat();
                fut.setVisible(true);
            }
        });
        this.add(sekretariat);

        background = new JLabel(new ImageIcon("Background.jpg"));
        background.setBounds(0, 0, 800, 655);
        this.add(background);

    }

    public static void main(String[] args) {
        Login login = new Login();
        login.setVisible(true);
    }
}